package com.carpedil.score.controller;

import com.carpedil.dto.ScoreDto;
import com.carpedil.score.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/** @author Administrator */
@RestController
public class ScoreController {
  @Autowired ScoreService scoreService;

  @GetMapping("/score/{token}")
  public List<ScoreDto> getScoreListByPerm(@PathVariable("token") String token) {
    return scoreService.getScoreList(token);
  }
}
